Add billing receipt privacy guard#424
Conversation
|
Hardening update pushed in 094ae6e: nested allowed provider metadata values now scan through structured objects, so private project context cannot hide inside an allowlisted metadata key. Validation refreshed locally: npm run check, npm test (6 tests), git diff --check, and sensitive-term scan returned no matches. |
|
Hardening update pushed in 25e1c08: customer-facing line-item identifiers and units are now scanned and redacted when they carry restricted dataset context, so private dataset labels cannot leak through receipt fields outside the description/projectRef path. Verification refreshed:
|
|
Follow-up competitive hardening pass for the billing receipt privacy guard. What changed in 3408b06:
Validation:
|
|
Follow-up competitive hardening pass for the billing receipt privacy guard. What changed in
Validation refreshed locally:
|
|
Follow-up competitive hardening pass for the billing receipt privacy guard. What changed in
Validation refreshed locally:
|
|
Follow-up competitive hardening pass for the billing receipt privacy guard. What changed in
Why this matters:
Validation refreshed locally:
|
|
Follow-up competitive hardening pass for the billing receipt privacy guard. What changed in
Validation refreshed locally:
|
|
Follow-up competitive hardening pass for the billing receipt privacy guard. What changed in
Why this matters:
Validation refreshed locally:
|
|
Hardening update pushed in This tightens the customer-facing receipt gate: malformed or negative numeric fields now block delivery even when they do not contain private research text. The guard emits Fresh validation from
This keeps #424 distinct from #362: #424 protects customer-facing receipt/privacy delivery, while #362 focuses on analytics license seat roster renewal/true-up controls. |
|
Pushed a focused hardening commit for malformed sparse provider line items: Fresh verification from |
|
Pushed a focused hardening commit for malformed top-level billing provider packets: Fresh verification from |
/claim #20
Summary
Adds a distinct
billing-receipt-privacy-guard/slice for Revenue Infrastructure issue #20.The guard validates customer-facing invoices, receipts, and payment-provider metadata before billing artifacts leave SCIBASE. It detects private research project context, restricted dataset references, collaborator identifiers, grant-sensitive phrases, unsafe receipt identifiers, unsafe customer-facing envelope fields, malformed monetary/quantity fields, malformed top-level billing batches, malformed line-item entries, unsafe line-item fields, unsafe provider metadata values, unsafe provider metadata key names, and sparse billing provider batches. Safe receipts remain deliverable, while unsafe receipts are held for finance review with redacted replacement identifiers, safe currency labels, replacement line items, redacted metadata-key handles, malformed-field repair actions, and deterministic audit evidence.
Hardening Updates
malformed-billing-batchfinance-repair evidence instead of crashing receipt review before any reviewer packet can be generated.malformed-line-itemfinance-repair evidence instead of crashing sparse billing provider payload review.nulland emitsinvalid-billing-amount/invalid-billing-quantityfindings.metadata-key-redacted-1.XXXwhen malformed receipt envelope data carries restricted dataset context.nullwhen billing fields carry restricted dataset context.Non-overlap
This is scoped to privacy-safe billing artifacts before invoice, receipt, or payment-provider delivery. It does not duplicate subscription entitlement or renewal guards, usage metering, tax controls, dispute evidence, procurement controls, pricing experiments, payment rail failover, webhook entitlement, invoice acceptance, storage overage, analytics licensing, credit breakage, FX/reconciliation, or revenue-recognition slices.
Validation
evaluateReceiptPrivacy(null)crashed atbatch.receipts.reports/malformed-batch-privacy-packet.jsonso reviewers can inspect the held malformed-batch path.cd billing-receipt-privacy-guard && npm run checkpassed: 18 tests plus deterministic demo and video generation.node --checkpassed forindex.js,test.js, anddemo.js.sha256:163469712907.ffprobeverifiedbilling-receipt-privacy-guard/reports/demo.mp4as H.264, 1280x720, 4s, 30fps, 120 frames, 56,900 bytes.git diff --check,git diff --cached --check, billing-guard-only staging, restricted-string scan, and generated report private-fixture scan passed.CLEAN; no checks are reported for this branch.Demo Artifacts
billing-receipt-privacy-guard/reports/receipt-privacy-packet.jsonbilling-receipt-privacy-guard/reports/empty-receipt-privacy-packet.jsonbilling-receipt-privacy-guard/reports/malformed-receipt-privacy-packet.jsonbilling-receipt-privacy-guard/reports/malformed-line-item-privacy-packet.jsonbilling-receipt-privacy-guard/reports/malformed-batch-privacy-packet.jsonbilling-receipt-privacy-guard/reports/receipt-privacy-report.mdbilling-receipt-privacy-guard/reports/summary.svgbilling-receipt-privacy-guard/reports/demo.mp4Synthetic data only. No credentials, payment processors, customer systems, private workspaces, institutional finance tools, payout systems, or external APIs are used.
AI-assisted with OpenAI Codex; I reviewed and locally verified the diff before submitting.